package com.gitee.wsl.doc.opml

import com.gitee.wsl.doc.SampleReader
import kotlin.test.Test
import kotlin.test.assertEquals


class UserlandSamplesTest {
    @Test
    @Throws(OpmlParseException::class)
    fun test() {
        val opml = SampleReader.parse("/opml/userlandsamples.opml")

        assertEquals(4, opml.body.outlines.size)
        assertEquals(
            "file.writewholefile (f, string.filledstring (\"x\", size))", opml.body.getOutline(1)!!
                .getSubElement(1)!!.getAttribute("text")
        )
    }
}
